import { Button, DatePicker, Form, Input, Modal, Select, Switch } from 'antd'
import React from 'react'

function FormBox({ gb, show, form, title, onFinish }) {
    return (
        <div>
            <Modal
                title={title}
                open={show}
                onCancel={gb}
                footer={null}
            >
                <Form form={form} onFinish={onFinish}>
                    <Form.Item label='id' name={'id'} hidden>
                        <Input />
                    </Form.Item>
                    <Form.Item label='姓名' name={'name'}>
                        <Input />
                    </Form.Item>
                    <Form.Item label='职业' name={'job'}>
                        <Select >
                            <Select.Option value='总经理'>总经理</Select.Option>
                            <Select.Option value='销售助理'>销售助理</Select.Option>
                            <Select.Option value='销售员'>销售员</Select.Option>
                        </Select>
                    </Form.Item>
                    <Form.Item label='职状' name={'type'}>
                        <Select >
                            <Select.Option value='正式员工'>正式员工</Select.Option>
                            <Select.Option value='实习生'>实习生</Select.Option>
                        </Select>
                    </Form.Item>
                    <Form.Item label='公司' name={'schema_name'}>
                        <Select >
                            <Select.Option value='北京分公司'>北京分公司</Select.Option>
                            <Select.Option value='上海分公司'>上海分公司</Select.Option>
                            <Select.Option value='浙江分公司'>浙江分公司</Select.Option>
                        </Select>
                    </Form.Item>
                    <Form.Item label='人数' name={'person_num'}>
                        <Input />
                    </Form.Item>
                    <Form.Item name={"status"} label='状态' valuePropName="checked">
                        <Switch></Switch>
                    </Form.Item>
                    <Form.Item>
                        <Button htmlType='submit'>提交</Button>
                    </Form.Item>
                </Form>
            </Modal>
        </div>
    )
}

export default React.memo(FormBox)
